<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="js/react.development.js"></script>
    <script src="js/react-dom.development.js"></script>
    <script src="js/babel.min.js"></script>
</head>
<body>
    <div id="root"></div>
    <script type="text/babel"> 
    
        class Inputxt extends React.Component{
            constructor(props){
                super(props);
                this.state = {iNum:10};
            }
            fnChange(ev){
                this.setState({iNum:ev.target.value})
            }
            render(){
                return(
                    <div>
                        <p>{this.state.iNum}</p>
                        <input type="text" value={this.state.iNum} onChange={this.fnChange.bind(this)}/>
                    </div>
                );
            }
        }
        ReactDOM.render(
            <Inputxt />,
            document.getElementById('root')
        )

        
    </script>
</body>
</html>